composite function find g(x)